package com.scud.system.mapper;

import com.scud.model.system.dto.AssignPermissionDto;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;

@Mapper
public interface RolePermissionMapper {
    @Delete("delete from role_permission where permission_id = #{id};")
    void deleteByPermissionId(Long id);

    @Delete("delete from role_permission where role_id = #{id};")
    void deleteByRoleId(Long id);

    void assign(AssignPermissionDto dto);

    void updateRolePermissionIsHalf(Integer id);

    List<Long> getPermissionIdsByRoleId(Long roleId);

}
